@import '@material/menu-surface/mixins.import';
@import '@material/list/mixins.import';
@import '../mdc-helpers/mdc-helpers';

@mixin mat-mdc-autocomplete-color($config-or-theme) {
  $config: mat-get-color-config($config-or-theme);
  @include mat-using-mdc-theme($config) {
    @include mdc-menu-surface-core-styles($mat-theme-styles-query);
    @include mdc-list-without-ripple($mat-theme-styles-query);
  }
}

@mixin mat-mdc-autocomplete-typography($config-or-theme) {
  $config: mat-get-typography-config($config-or-theme);
  @include mat-using-mdc-typography($config) {
    @include mdc-menu-surface-core-styles($mat-typography-styles-query);

    .mat-mdc-autocomplete-panel {
      // Note that we include this private mixin, because the public one adds
      // a bunch of styles that we aren't using for the autocomplete panel.
      @include mdc-list-base_($mat-typography-styles-query);
    }
  }
}

@mixin mat-mdc-autocomplete-density($config-or-theme) {}

@mixin mat-mdc-autocomplete-theme($theme-or-color-config) {
  $theme: mat-private-legacy-get-theme($theme-or-color-config);
  @include mat-private-check-duplicate-theme-styles($theme, 'mat-mdc-autocomplete') {
    $color: mat-get-color-config($theme);
    $density: mat-get-density-config($theme);
    $typography: mat-get-typography-config($theme);

    @if $color != null {
      @include mat-mdc-autocomplete-color($color);
    }
    @if $density != null {
      @include mat-mdc-autocomplete-density($density);
    }
    @if $typography != null {
      @include mat-mdc-autocomplete-typography($typography);
    }
  }
}
